<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" import="java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%
int val=0;
double w=0;
Burger[] burgerList;
burgerList=(Burger[])session.getAttribute("burgerData");
%>
<%@page import="com.burger.counter.beans.Burger"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Build Ur Burger Menu</title>
<link rel="stylesheet" href="default.css" type="text/css"></link>
</head>
<body>

<%@ include file="header.jsp" %>
<form name="burger" id="burger" method="POST" action="CheeseServlet" target ="leftFrame" >
	<div class ="inputColumn" id = "AddStarter"  
			style="text-align: left; border: none; margin: auto;">	
		<table border="0" style="border-style: dashed">
		<tr>
		<th align="left" style="color:red" bordercolor="red" >Beef </th>
		<th  align="left" style="color:red" bordercolor="red">Chicken</th>
		<th  align="left" style="color:red" bordercolor="red">Market Selection MP</th>
		<th  align="left" style="color:red" bordercolor="red">Turkey</th>
		<th  align="left" style="color:red" bordercolor="red">Veggie</th>
		</tr>
		
		<% for(int i=0;i<3;i++)
		{
			if(i==0)w = 0.33;
			if(i==2)w = 0.66;
			if(i==1)w = 1;
		%>
		<tr bordercolor="red" style="border-style: none" bordercolor="white">
		<% for(int j=0;j<burgerList.length;j++)
		{
		if(burgerList[j].getBurgerWeight()== w){
			val = burgerList[j].getBurgerId();
			%>
		  <td bordercolor="red" bordercolor="white">
		  <%if (i==0){ %>
		  <input type="radio" value='<%=val%>' name="BurgerId" CHECKED />
		  <label style="size: 30;"><%=burgerList[i].getBurgerWeight()%>lb</label>				
			<label style="size: 30;"><%=burgerList[i].getBurgerPrice()%>$</label>
			<input type="hidden" value='<%=burgerList[i].getBurgerName()%>' name="BurgerName"  />
			<input type="hidden" value='<%=burgerList[i].getBurgerPrice()%>' name="BurgerPrice"  />
		  <%} else{%>
			<input type="radio" value='<%=val%>' 
							name="BurgerId"  />
			<label style="size: 30;"><%=burgerList[i].getBurgerWeight()%>lb</label>				
			<label style="size: 30;"><%=burgerList[i].getBurgerPrice()%>$</label>
			<input type="hidden" value='<%=burgerList[i].getBurgerName()%>' name="BurgerName"  />
			<input type="hidden" value='<%=burgerList[i].getBurgerPrice()%>' name="BurgerPrice"  />
			</td>
		<%
		  }
			}
		}
		%>
		</tr>
		<%
			}
		%>
	</table><br><br>
	<div style="text-align:center;color:red;font-size:2em;font-family: sans serif;">
	<input type="submit" value="Next" align ="middle"/>
	</div>
	
	
	
</div>
</form>
</body>
</html>